/*
 * @Date: 2022-05-22 12:40:03
 * @LastEditors: sailornpg
 * @LastEditTime: 2022-05-22 12:46:44
 * @FilePath: \my-react-components\src\stories\Tabs.stories.tsx
 * @Description: something
 */
import React from "react";
import { ComponentStory, ComponentMeta } from "@storybook/react";
import Tabs from "../component/Tabs";
import TabItem from "../component/Tabs/TabItem";

export default {
  title: "Example/Tabs",
  component: Tabs,
  argTypes: {
    backgroundColor: { control: "color" },
  },
} as ComponentMeta<typeof Tabs>;

const Template: ComponentStory<typeof Tabs> = (args) => (
  <Tabs {...args}>
    <TabItem label="选项1">
      <p>12331</p>
    </TabItem>
    <TabItem label="选项2">选项2内容</TabItem>
    <TabItem label="选项3" disabled>
      选项3内容
    </TabItem>
  </Tabs>
);
export const defaultTab = Template.bind({});
export const border = Template.bind({});
defaultTab.args = {
  defaultIndex: "0",
};
border.args = {
  defaultIndex: "0",
  border: true,
};
